package com.hcinfos.gsoo.ui;

import java.util.ArrayList;
import java.util.List;

import com.hcinfos.gsoo.R;
import com.hcinfos.gsoo.adapter.MyDiancaiAdapter;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ListView;

/**
 * 我的点菜
 * 
 * @author john
 * 
 */
public class MyDiancaiActivity extends Activity implements OnClickListener {

	private ImageView back_iv;
	private ListView listView;
	private List<String> list;
	private MyDiancaiAdapter adapter;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_my_diancai);

		back_iv = (ImageView) findViewById(R.id.back_iv);
		back_iv.setOnClickListener(this);
		listView = (ListView) findViewById(R.id.listView);
		
		list = new ArrayList<String>();
		list.add("test");
		list.add("test");
		list.add("test");
		
		adapter = new MyDiancaiAdapter(this, list);
		listView.setAdapter(adapter);
		
	}

	@Override
	public void onClick(View v) {

		switch (v.getId()) {
		case R.id.back_iv:
			finish();
			break;
		}
	}

}
